package com.spring.controller;

import com.alibaba.druid.pool.DruidDataSource;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Component
@RestController
public class Test {
    @Autowired
    private DruidDataSource dataSource;

    @RequestMapping("hello")
    public String x(){
        return dataSource.getUrl();
    }
}
